<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>4-利用对象封装自己的数学对象  里面有 PI 最大值和最小值</title>
	</head>
	<body>
		<script type="text/javascript">
			var myMax = {
				PI:3.1415926,
				Max:function(){
					console.log(arguments);
					var max = arguments[0];
					for(var z=0;z<arguments.length;z++){
						max = max>arguments[z] ? max:arguments[z]
					}
					return max
				},
				min:function(){
					console.log(arguments);
					var min = arguments[0];
					for(var z=0;z<arguments.length;z++){
						min =min>arguments[z] ? arguments[z]:min;
					}
					return min;
				}
			}
			console.log(Math.PI);
			var max = myMax.Max(1,6,9);
			console.log(max);
			var min =myMax.min(1,6,9);
			console.log(min);
		</script>
	</body>
</html>
